﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp5
{
    class TaskNPC : NPC
    {
        private string Taskinfo;
        public string taskinfo { get => Taskinfo; set => Taskinfo = value; }
        public TaskNPC(string name, NPCType nPCType, string taskinfo) : base(name, nPCType)
        {
            this.taskinfo = taskinfo;
        }

       

        public override void Speak()
        {
            int key;
            Console.WriteLine("NPC：{0}，你能帮帮我吗？任务：{1}", this.Name, this.taskinfo);
            Console.WriteLine("请选择：1、帮  2、不帮");
            key = int.Parse(Console.ReadLine());
            switch (key)
            {
                case 1:
                    Console.WriteLine("谢谢你！");
                    break;
                case 2:
                    Console.WriteLine("我谢谢你...");
                    break;
                default:
                    Console.WriteLine("请你看题目...");
                    break;
            }
        }
    }
}
